home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form MainMenu
- AutoRedraw = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "VBits - Optimizing Visual Basic Code"
- ClientHeight = 4665
- ClientLeft = 1305
- ClientTop = 1815
- ClientWidth = 4395
- ClipControls = 0 'False
- Height = 5355
- Icon = MAINMENU.FRX:0000
- Left = 1245
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 4665
- ScaleWidth = 4395
- Top = 1185
- Width = 4515
- Begin CheckBox chkSplash
- BackColor = &H00C0C0C0&
- Caption = "Splash Screen"
- Height = 285
- Left = 2490
- TabIndex = 11
- Top = 2895
- Width = 1545
- End
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Examples"
- ClipControls = 0 'False
- Height = 4440
- Left = 120
- TabIndex = 9
- Top = 105
- Width = 4140
- Begin OptionButton optSplash
- BackColor = &H00C0C0C0&
- Caption = "Application Load"
- Height = 255
- Left = 405
- TabIndex = 10
- Top = 2790
- Width = 1845
- End
- Begin CommandButton cmdShow
- Caption = "E&xit"
- Height = 372
- Index = 1
- Left = 2385
- TabIndex = 8
- Top = 3915
- Width = 1332
- End
- Begin OptionButton optOLE
- BackColor = &H00C0C0C0&
- Caption = "OLE Automation"
- Height = 250
- Left = 400
- TabIndex = 6
- Top = 2450
- Width = 2000
- End
- Begin OptionButton optImages
- BackColor = &H00C0C0C0&
- Caption = "Images v. Pictures"
- Height = 250
- Left = 400
- TabIndex = 5
- Top = 2100
- Width = 2000
- End
- Begin OptionButton optAlgorithms
- BackColor = &H00C0C0C0&
- Caption = "Algorithms"
- Height = 250
- Left = 400
- TabIndex = 1
- Top = 700
- Width = 2000
- End
- Begin OptionButton optStrings
- BackColor = &H00C0C0C0&
- Caption = "Strings && Files"
- Height = 250
- Left = 400
- TabIndex = 4
- Top = 1750
- Width = 2000
- End
- Begin CommandButton cmdShow
- Caption = "&Show"
- Default = -1 'True
- Height = 372
- Index = 0
- Left = 375
- TabIndex = 7
- Top = 3915
- Width = 1332
- End
- Begin OptionButton optDataXess
- BackColor = &H00C0C0C0&
- Caption = "Data Access"
- Height = 250
- Left = 400
- TabIndex = 3
- Top = 1400
- Width = 2000
- End
- Begin OptionButton optGraphics
- BackColor = &H00C0C0C0&
- Caption = "Graphics"
- Height = 250
- Left = 400
- TabIndex = 2
- Top = 1050
- Width = 2000
- End
- Begin OptionButton optVariables
- BackColor = &H00C0C0C0&
- Caption = "Variables"
- Height = 250
- Left = 400
- TabIndex = 0
- Top = 350
- Value = -1 'True
- Width = 2000
- End
- Begin Image Image1
- Height = 480
- Left = 3570
- Picture = MAINMENU.FRX:0302
- Top = 165
- Width = 480
- End
- End
- Begin Menu mnu_File
- Caption = "&File"
- Begin Menu mnu_FileExit
- Caption = "E&xit"
- End
- End
- Begin Menu mnu_Help
- Caption = "&Help"
- Begin Menu mnu_HelpAbout
- Caption = "&About..."
- End
- End
- Sub cmdShow_Click (Index As Integer)
- Select Case Index
- Case 0 ' Show
- If optVariables Then
- Variables.Show
- ElseIf optDataXess Then
- Dataxess.Show
- ElseIf optStrings Then
- Strings.Show
- ElseIf optAlgorithms Then
- Algorithms.Show
- ElseIf optImages Then
- frmPictures.Show
- ElseIf optOLE Then
- frmOLE.Show
- ElseIf optGraphics Then
- Graphics.Show
- ElseIf optSplash Then
- If chkSplash.Value = CHECKED Then
- ShowSplash
-
- Else
- NoSplash
- End If
-
- End If
- Case 1 ' Exit
- Unload Me
- End Select
- End Sub
- Sub Form_Load ()
- Me.Left = (Screen.Width - Me.Width) / 2
- Me.Top = (Screen.Height - Me.Height) / 2
- End Sub
- Sub mnu_FileExit_Click ()
- Unload Me
- End Sub
- Sub mnu_HelpAbout_Click ()
- frmAbout.Show
- End Sub
- Sub NoSplash ()
-
- ' Now load a bunch of forms.
- Dim foo1 As New frmImages
- foo1.Caption = "Foo1"
- foo1.Left = 0
- foo1.Top = 0
-
- Dim foo2 As New frmImages
- foo2.Caption = "Foo2"
- foo2.Left = 200
- foo2.Top = 100
-
- Dim foo3 As New frmImages
- foo3.Caption = "Foo3"
- foo3.Left = 300
- foo3.Top = 150
-
- Dim foo4 As New frmImages
- foo4.Caption = "Foo4"
- foo4.Left = 400
- foo4.Top = 200
- End Sub
- Sub ShowSplash ()
- On Error GoTo SplashLoadErr
- iStatusBarWidth = 4575
-
- Screen.MousePointer = HOURGLASS
- Load Splash
- Splash.Show
- ' Set the splash screen to stay on top.
- success% = SetWindowPos(Splash.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
- ' Now load a bunch of forms.
- Dim foo1 As New frmImages
- Splash.rctStatusBar.Width = iStatusBarWidth * .25
- Splash.Refresh
- foo1.Caption = "Foo1"
- foo1.Left = 0
- foo1.Top = 0
-
- Dim foo2 As New frmImages
- Splash.rctStatusBar.Width = iStatusBarWidth * .5
- Splash.Refresh
- foo2.Caption = "Foo2"
- foo2.Left = 200
- foo2.Top = 100
-
- Dim foo3 As New frmImages
- Splash.rctStatusBar.Width = iStatusBarWidth * .75
- Splash.Refresh
- foo3.Caption = "Foo3"
- foo3.Left = 300
- foo3.Top = 150
-
- Dim foo4 As New frmImages
- Splash.rctStatusBar.Width = iStatusBarWidth
- Splash.Refresh
- foo4.Caption = "Foo4"
- foo4.Left = 400
- foo4.Top = 200
- ' Turn off the top most window flag.
- success% = SetWindowPos(Splash.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
- Unload Splash
- Screen.MousePointer = DEFAULT
- Exit Sub
- SplashLoadErr:
- success% = SetWindowPos(Splash.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
- Unload Splash
- Screen.MousePointer = DEFAULT
- MsgBox Error$ & " - " & Str$(Err), MB_ICONEXCLAMATION, "Application Load Error"
- Exit Sub
- End Sub
-